import { createApp } from "vue";
import "./style.less";
import App from "./App.vue";
import router from "./route/index";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
// element-plus icons
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 引入pinia
import { createPinia } from "pinia";
const pinia = createPinia();
// 引入mock
import "./mock/index.ts";
// 引入导航守卫
import "./route/guard";

// 引入自定义指令-按钮 文件
import permission from "@/directives/permission";

const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
app.directive("permission", permission);
app.use(ElementPlus);
app.use(router);
app.use(pinia);
app.mount("#app");
